<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button id="btn">跳转到test.html</button>
    <button id="change">改变路径</button>
    <script>
        console.log(window.history)
        btn.addEventListener("click", ()=> {
            // window.location.href = "./test.html"
            // window.history.forward()
            window.history.go(1)
        })

        change.addEventListener("click", function() {
            // 还在当前页面 ，但是改变了路径。
            window.history.pushState("", "", "/abc")
        })
    </script>
</body>
</html>